import hyRequest from '@/services'
import type {
  IAmountListResponse,
  ICategoryAddressSaleResponse,
  ICateoryFavorResponse,
  ICateorySaleResponse,
  ICountCardResponse
} from '.'

export function getAmountListData() {
  return hyRequest.get<ICountCardResponse>({
    url: '/goods/amount/list'
  })
}

export function getGoodsCategoryCount() {
  return hyRequest.get<IAmountListResponse>({
    url: '/goods/category/count'
  })
}

export function getGoodsCategorySale() {
  return hyRequest.get<ICateorySaleResponse>({
    url: '/goods/category/sale'
  })
}

export function getGoodsCategoryFavor() {
  return hyRequest.get<ICateoryFavorResponse>({
    url: '/goods/category/favor'
  })
}

export function getGoodsAddressSale() {
  return hyRequest.get<ICategoryAddressSaleResponse>({
    url: '/goods/address/sale'
  })
}
